package com.bmps.springcloud.insuredmicroservice.model.cancel;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * description:
 * 返回结果
 *
 * @author jackdaw
 * @date 2019-11-29 10:46
 */
public class ResultInfoModel implements Serializable {
    private static final long serialVersionUID = -1035089869559693336L;
    @XStreamAlias("PrtNo")
    private String prtNo;
    @XStreamAlias("ResultCode")
    private String resultCode;

    @XStreamAlias("ResultMessage")
    private String resultMessage;

    public String getPrtNo() {
        return prtNo;
    }

    public void setPrtNo(String prtNo) {
        this.prtNo = prtNo;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(String resultMessage) {
        this.resultMessage = resultMessage;
    }

    @Override
    public String toString() {
        return "ResultInfoModel{" +
                "prtNo='" + prtNo + '\'' +
                ", resultCode='" + resultCode + '\'' +
                ", resultMessage='" + resultMessage + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof ResultInfoModel)) {
            return false;
        }

        ResultInfoModel that = (ResultInfoModel) o;

        return new EqualsBuilder()
                .append(prtNo, that.prtNo)
                .append(resultCode, that.resultCode)
                .append(resultMessage, that.resultMessage)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(prtNo)
                .append(resultCode)
                .append(resultMessage)
                .toHashCode();
    }
}
